package com.example.perplonews.a_d_fragment.e_mine

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.widget.ImageView
import android.widget.LinearLayout
import android.widget.TextView
import com.bumptech.glide.Glide
import com.bumptech.glide.load.resource.bitmap.CircleCrop
import com.bumptech.glide.request.RequestOptions
import com.example.perplonews.R

class UserActivity : AppCompatActivity() {
    private val userImg: ImageView by lazy { findViewById<ImageView>(R.id.user_img) }
    private val userName: TextView by lazy { findViewById<TextView>(R.id.user_name) }
    private val imgLin: LinearLayout by lazy { findViewById<LinearLayout>(R.id.img_lin) }
    private val nameLin: LinearLayout by lazy { findViewById<LinearLayout>(R.id.name_lin) }

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_user)
        val name = intent.getStringExtra("username")
        val img = intent.getStringExtra("userimg")
        userName.setText(name)

        Glide.with(userImg.context)
            .load("https://i01piccdn.sogoucdn.com/082fb9a40bab4521")
            .apply(RequestOptions.bitmapTransform(CircleCrop()))
            .into(userImg)
        imgLin.setOnClickListener {

        }
        nameLin.setOnClickListener {

        }


    }




}